Skip to content

Workaround Integer detection for ruby 2.4 onward#31

Open
bootleq wants to merge 1 commit intopascal-za:masterfrom
bootleq:integer
Open

Workaround Integer detection for ruby 2.4 onward#31
bootleq wants to merge 1 commit intopascal-za:masterfrom
bootleq:integer

Conversation

@bootleq
Copy link
Copy Markdown
Contributor

@bootleq bootleq commented Apr 30, 2019

Problem:
Ruby 2.4 unifies Fixnum and Bignum into Integer, a field definition foo: 100 previously map to migrant's DataType::Fixnum (by asking 100.class.name) will incorrectly change to Integer < Bignum.

This will cause many differences detected, and produce migration files to add limit => 8 and might remove default => nil to integer fields.

We used to detect field definition `foo 42` by ask the class name of 42,
which was `Fixnum` before ruby 2.4, but now `Integer`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant